<?php
/**
 * Session.php              session管理模型
 *
 * @author                  mashanling <msl-138@163.com>
 * @date                    2012-09-18 14:47:52
 * @lastmodify             2012-12-30 11:11:553 by mashanling
 */

class SessionModel extends BaseModel {
    protected $_auto = array(//自动填充
        'last_time'    => 'gmtime',
        'user_id'      => 'get_user_id',
        'user_ip'      => 'get_client_ip#1',
        'admin_id'     => '_getAdminId',
        'page_url'     => '_getPageUrl',
        'referer_url'  => '_getRefererUrl',
        'controller'   => array('string', MODULE_NAME),
        'action'       => array('string', ACTION_NAME),
    );
    protected $_db_fields = array (
        'session_id'     => null,//session id
        'data'           => null,//session内容
        'controller'     => null,//控制器
        'action'         => null,//操作方法
        'last_time'      => null,//最后活跃时间
        'page_url'       => null,//日志页面
        'referer_url'    => null,//来路页面
        'admin_id'       => null,//管理员ip
        'user_id'        => null,//管理员id
        'user_ip'        => null,//管理员姓名
    );
    protected $_pk_field = 'session_id';//主键
    protected $_true_table_name = TB_SESSION;//表
}